<?php include _include(ADMIN_PATH.'view/htm/header.inc.htm');$set = setting_get('tt_reward');?>
<div class="row"><div class="col-lg-10 mx-auto"><div class="card"><div class="card-body" ><h3>后期技术支持</h3>官方网站：http://www.6rabbit.com/ <a href="http://www.6rabbit.com"target="_blank" style="text-decoration: none">点击进入</a><br>
官方QQ群：58911696（正常群）、77868272（只吹牛不讨论正事）</div></div><div class="card"><div class="card-body" ><h3>分用户组奖励设置</h3>
    <form action="<?php echo url('plugin-setting-tt_reward');?>" method="post" id="form">
<table class="table"><tr><th>用户组名</th><th>经验(起始)</th><th>经验(终止)</th><th>金币(起始)</th><th>金币(终止)</th><th>人民币 分(起始)</th><th>人民币 分(终止)</th></tr>
    <?php foreach($grouplist as $_group){?><tr><td> <?php echo $_group['name']; ?></td>
        <td><input class="form-control" name="exp_from[<?php echo $_group['gid']?>]" value="<?php echo $_group['reward_from1'];?>"/></td>
        <td><input class="form-control" name="exp_to[<?php echo $_group['gid']?>]" value="<?php echo $_group['reward_to1'];?>"/></td>
        <td><input class="form-control" name="gold_from[<?php echo $_group['gid']?>]" value="<?php echo $_group['reward_from2'];?>"/></td>
        <td><input class="form-control" name="gold_to[<?php echo $_group['gid']?>]" value="<?php echo $_group['reward_to2'];?>"/></td>
        <td><input class="form-control" name="rmb_from[<?php echo $_group['gid']?>]" value="<?php echo $_group['reward_from3'];?>"/></td>
        <td><input class="form-control" name="rmb_to[<?php echo $_group['gid']?>]" value="<?php echo $_group['reward_to3'];?>"/></td>
    </tr><?php }?>
</table><div>
<input type="checkbox" name="self_use" id="self_use" <?php echo $set['self_use']?'checked':'';?> /><label for="self_use">打赏时扣除自身积分(负分不加)</label><br>
每日打赏次数限制(0为不限): <input class="form-control" name="limit" id="limit" value="<?php echo $set['limit'];?>" style="display:inline;"/>
</div>
<button type="submit" class="btn btn-primary btn-block" id="submit" data-loading-text="<?php echo lang('submiting');?>..."><?php echo lang('confirm');?></button>
</form></div></div></div></div>
<?php include _include(ADMIN_PATH.'view/htm/footer.inc.htm');?>
<script>
    var jform = $("#form");var jsubmit = $("#submit");
    jform.on('submit', function(){
        jform.reset();jsubmit.button('loading'); var postdata = jform.serialize();
        $.xpost(jform.attr('action'), postdata, function(code, message) {
            if(code == 0) {
                $.alert(message);
                setTimeout(function() {window.location.reload();jsubmit.button('reset');}, 1000);
                return;
            } else {
                $.alert(message);jsubmit.button('reset');}
        });
        return false;
    });
</script>